<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="signup.aspx.cs" Inherits="signup" Title="Sign Up" %>

<%@ Register TagPrefix="TL" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <TL:RadScriptManager ID="RadScriptManagerRegisterAccount" runat="server">
    </TL:RadScriptManager>

    
    <!-- Content goes here -->
    
    <asp:LinkButton ID="lbDealer" runat="server" Text="If you want to become a dealer, please click here" 
                    OnClick="lbDealer_Click" CausesValidation="false" />
<table id="tbRegisterAccount" style="margin:10px auto" width="100%" cellpadding="10">
    <tr>
        <td colspan="2">
            <h3 style="color:Blue; border-bottom:dotted 1px black">Personal Informations :</h3>
        </td>
    </tr>
    <tr>
        <td style="width: 161px">
            First Name : 
        </td>
        <td>
            <asp:TextBox ID="txtFirstName" runat="server" />
        </td>
    </tr>
    <tr>
        <td style="width: 161px">
            Last Name : 
        </td>
        <td>
            <asp:TextBox ID="txtLastName" runat="server" />
        </td>
    </tr>
    <tr>
        <td style="width: 161px">
            Address : 
        </td>
        <td>
            <asp:TextBox ID="txtAddress" runat="server" />
        </td>
    </tr>
    <tr>
        <td style="width: 161px">
            City : 
        </td>
        <td>
            <asp:TextBox ID="txtCity" runat="server" />
        </td>
    </tr>
    <tr>
        <td style="width: 161px">
            Phone : 
        </td>
        <td>
            <asp:TextBox ID="txtPhone" runat="server" />
        </td>
    </tr>
    <tr>
        <td style="width: 161px">
            Email : 
        </td>
        <td>
            <asp:TextBox ID="txtEmail" runat="server" />
        </td>
    </tr>
    <tr>
        <td style="width: 161px">
            Date of Birth : 
        </td>
        <td>
            <asp:TextBox ID="txtDateOfBirth" runat="server" />
        </td>
    </tr>
    <tr>
        <td style="width: 161px">
            Bank Name : 
        </td>
        <td>
            <asp:DropDownList ID="ddlstBankName" runat="server" AutoPostBack="false" Width="150px">
                <asp:ListItem Value="VIETCOMBANK" Selected="True">VIETCOMBANK</asp:ListItem>
                <asp:ListItem Value="ACB">ACB</asp:ListItem>
                <asp:ListItem Value="INCOMBANK">INCOMBANK</asp:ListItem>
                <asp:ListItem Value="AGRIBANK">AGRIBANK</asp:ListItem>
                <asp:ListItem Value="DONGABANK">DONGABANK</asp:ListItem>
                <asp:ListItem Value="EXIMBANK">EXIMBANK</asp:ListItem>
                <asp:ListItem Value="VIETINBANK">VIETINBANK</asp:ListItem>
                <asp:ListItem Value="MILITARYBANK">MILITARYBANK</asp:ListItem>
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td style="width: 161px">
            Account Number : 
        </td>
        <td>
            <asp:TextBox ID="txtAccountNumber" runat="server" />
        </td>
    </tr>
    <tr>        
        <td style="width: 161px">
            <asp:Label ID="lblTaxCode" runat="server" Visible="false" />
        </td>
        <td>
            <asp:TextBox ID="txtTaxCode" runat="server" Visible="false" />
        </td>        
    </tr>
    <tr>
        <td colspan="2">
            <h3 style="color:Blue; border-bottom:dotted 1px black">Account Information</h3>
        </td>
    </tr>
    <tr>
        <td style="width: 161px">
            Username :
        </td>
        <td>
            <asp:TextBox ID="txtUsername" runat="server" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtUsername" ValidationGroup="1"
                Display="Dynamic" ErrorMessage="username is required">*</asp:RequiredFieldValidator></td>
    </tr>
    <tr>
        <td style="width: 161px">
            Password :
        </td>
        <td>
            <asp:TextBox ID="txtPassword" runat="server" TextMode="password" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPassword" ValidationGroup="1"
                Display="Dynamic" ErrorMessage="password is required">*</asp:RequiredFieldValidator></td>
    </tr>
    <tr>
        <td style="width: 161px">
            Re-type Password :
        </td>
        <td>
            <asp:TextBox ID="txtRetype" runat="server" TextMode="password" />
            <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtPassword" ValidationGroup="1"
                ControlToValidate="txtRetype" Display="Dynamic" ErrorMessage="password is not match">*</asp:CompareValidator></td>
    </tr>
    <tr>
        <td style="width: 161px">
            Secret question :
        </td>
        <td>
            <asp:DropDownList style="POSITION: relative" id="ddlSecretQuestion" runat="server" Width="210px">                
                <asp:ListItem Value="What was you first pet's name?">What was you first pet's name?</asp:ListItem>
                <asp:ListItem Value="What was the make of your first car?">What was the make of your first car?</asp:ListItem>
                <asp:ListItem Value="What was your favorite food as a child?">What was your favorite food as a child?</asp:ListItem>
                <asp:ListItem Value="Who is your favorite  author?">Who is your favorite  author?</asp:ListItem>
                <asp:ListItem Value="What is the name of your favorite book?">What is the name of your favorite book?</asp:ListItem>
                <asp:ListItem Value="What is the name of the hospital where you were born?">What is the name of the hospital where you were born?</asp:ListItem>
            </asp:DropDownList>
        </td>
    </tr>                
        <tr>
        <td style="width: 161px">
            
        </td>
        <td>            
            This question will be used to verify your identify if you need to request your account name or password in the future            
        </td>
    </tr>
    <tr>
        <td style="width: 161px">
            Secret Answer :
        </td>
        <td>
            <asp:TextBox ID="txtAnswer" runat="server" />
        </td>
    </tr>    
    <tr>
        <td colspan="2" style="text-align:center">
            <asp:Button ID="btnCreateMyAccount" runat="server" Text="Create My Account" OnClick="btnCreateMyAccount_Click" />
        </td>
    </tr>
    <tr>
        <td colspan="2" style="text-align:center">            
                <asp:Label ID="lblResult" runat="server" />            
        </td>
    </tr>                                         
</table>
    
    <!-- TL Rad Input Manager goes here to manages all input controls above  -->          
<TL:RadInputManager ID="RadInputManagerRegisterAccount" runat="server">
                <TL:TextBoxSetting BehaviorID="NormalTextBox" Validation-IsRequired="true" Validation-ValidationGroup="1">
                    <TargetControls>
                        <TL:TargetInput ControlID="txtAddress" />
                        <TL:TargetInput ControlID="txtCity" />
                        <TL:TargetInput ControlID="txtRetype" />
                        <TL:TargetInput ControlID="txtAnswer" />
                    </TargetControls>
                </TL:TextBoxSetting>
                
                <TL:RegExpTextBoxSetting BehaviorID="CharacterOnly" Validation-ValidationGroup="1"
                                Validation-IsRequired="true" ValidationExpression="^[A-Za-z ]+$" ErrorMessage="Invalid FirstName">
                    <TargetControls>
                        <TL:TargetInput ControlID="txtFirstName" />
                        <TL:TargetInput ControlID="txtLastName" />
                    </TargetControls>
                </TL:RegExpTextBoxSetting>                                
                
                <TL:DateInputSetting BehaviorID="DateInput" Validation-ValidationGroup="1">
                    <TargetControls>
                        <TL:TargetInput ControlID="txtDateOfBirth" />
                    </TargetControls>
                </TL:DateInputSetting>
                
                <TL:RegExpTextBoxSetting BehaviorID="RagExpEmail" Validation-IsRequired="true" Validation-ValidationGroup="1"
                    ValidationExpression="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$" ErrorMessage="Invalid Email" >
                    <TargetControls>
                        <TL:TargetInput ControlID="txtEmail" />
                    </TargetControls>
                </TL:RegExpTextBoxSetting>
                
                <TL:RegExpTextBoxSetting BehaviorID="RagExpNumber1" Validation-IsRequired="true" Validation-ValidationGroup="1"
                    ValidationExpression="^\d{5}$" ErrorMessage="Enter less than 5 digits">
                    <TargetControls>
                        <TL:TargetInput ControlID="txtPhone" />
                        <TL:TargetInput ControlID="txtTaxCode" />
                    </TargetControls>
                </TL:RegExpTextBoxSetting>
                
                <TL:RegExpTextBoxSetting BehaviorID="RagExpNumber2" Validation-IsRequired="true" Validation-ValidationGroup="1"
                    ValidationExpression="^\d{9}$" ErrorMessage="Enter less than 9 digits">
                    <TargetControls>
                        <TL:TargetInput ControlID="txtAccountNumber" />
                    </TargetControls>
                </TL:RegExpTextBoxSetting>
                
            </TL:RadInputManager>
    <!-- end Telerik Input Manager -->
</asp:Content>
